//
//  WDCheckHeadView.m
//  Zhihuijinfu
//
//  Created by 王笛 on 2017/2/23.
//  Copyright © 2017年 王笛. All rights reserved.
//

#import "WDCheckHeadView.h"
#import "WDLoan.h"

@interface WDCheckHeadView ()
@property (weak, nonatomic) IBOutlet UILabel *userNameLabel;
@property (weak, nonatomic) IBOutlet UILabel *loanMoneyLabel;
@property (weak, nonatomic) IBOutlet UILabel *termLabel;
@property (weak, nonatomic) IBOutlet UILabel *productLabel;

@end

@implementation WDCheckHeadView

- (void)setLoan:(WDLoan *)loan
{
    _loan = loan;
    
    self.userNameLabel.text = loan.user_name;
    self.loanMoneyLabel.text = [NSString stringWithFormat:@"%.2f 万", [loan.loan_amount floatValue]];
    self.termLabel.text = loan.pay_periods;
    self.productLabel.text = loan.product_name;
}

+ (instancetype)checkHeadView
{
    WDCheckHeadView *headView = [[[NSBundle mainBundle] loadNibNamed:NSStringFromClass(self) owner:nil options:nil] lastObject];
    
    return headView;
}

@end
